﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using TA.Turbo;

public partial class SimpleForm_Default : TPage
{
	public SimpleForm_Default()
	{
		this.ControlState["V1"] = 0;
		this.ControlState["V2"] = 0;
	}
	protected int Value1
	{
		get
		{
			//if (this.ControlState["V1"] == null) return 0;
			return (int)this.ControlState["V1"];
		}
		set
		{
			this.ControlState["V1"] = value;
		}
	}
	protected int Value2
	{
		get
		{
			//if (this.ControlState["V2"] == null) return 0;
			return (int)this.ControlState["V2"];
		}
		set
		{
			this.ControlState["V2"] = value;
		}
	}
	protected override void OnInit(EventArgs e)
	{
		base.OnInit(e);

		this.RegisterControlState(this);
	}
	protected void btnIncrement_Click(object s, EventArgs e)
	{
		++this.Value1;
		++this.Value2;

		this.txtValue.Value = (this.Value1 + this.Value2).ToString();
	}
}
